/*******************************************************
> Copyright (C) 2024 ==IOT== All rights reserved.
> File Name: func_array.cpp
> Author: IOT
> Website:www.slq.org
> Created Time: 2024年10月25日 星期五 10时55分41秒
***************************************************/

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

void fun1()
{
	cout << "this is fun1" << endl;
}


void fun2()
{
	cout << "this is fun2" << endl;
}

void fun3()
{
	cout << "this is fun3" << endl;
}

typedef unsigned char u8;
typedef unsigned int u32;
typedef void (*fun_t)();


int main(int argc,const char* argv[])
{
	fun_t funs[3] = {fun1, fun2, fun3};
	
	for (int i = 0; i < 3; i++) {
		(funs[i])();
	}

	//fun_t *vptr = funs;
	
	void (**vptr)() = funs;

	(vptr[0])();
	(vptr[1])();
	(vptr[2])();

    return 0;
}

